import gtk

class track(gtk.Layout):
    def __init__(self, trackname):
        gtk.Layout.__init__(self)
        self.len=0
        self.track=trackname
        
        self.label=gtk.Label
        name=trackname.split("/")
        name=name[len(name)-1]
        self.label.set_text(name)
        self.put(self.label, 0, 0)
        
        self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#FF0000"))
            
    def set_len(self, lenght):
        self.len=lenght
    
    def set_width(self, width):
        self.set_size(width, 48)
    
    def get_track(self):
        return self.trackname, self.len